generator synchronization with grid method